package javaSE;

public class MyStringTest {
    public static void main(String[] args) {
        String str1 = "hello java";
        String str2 = "hello java";

        if (str1.equals(str2)) {
            String kk = str1.replace(" ", "");
            System.out.println(kk);

           String yy = str2.replace("java","word");
            System.out.println(yy);
        }
    }
}